<hr class="divider">
<div class="container">
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <div class="panel panel-primary">
                <div class="panel-heading">修改资料</div>
                <div class="panel-body">

                    <div class="widget ">
                        <div class="widget-content">

                            {{if .flash.error}}
                            <div class="alert alert-danger" role="alert">
                                <button type="button" class="close" data-dismiss="alert">×</button>
                                {{.flash.error}}
                            </div>
                            {{end}} {{if .flash.success}}
                            <div class="alert alert-success">
                                <button type="button" class="close" data-dismiss="alert">×</button>
                                {{.flash.success}}
                            </div>
                            {{end}}

                            <form class="form-horizontal" method="post" action="{{urlfor " MainController.Profile "}}">
                                <fieldset>

                                    <div class="control-group">
                                        <label class="control-label" for="username">用户名</label>
                                        <div class="controls">
                                            <input type="text" class="span3 disabled" id="username" value="{{.user.UserName}}" disabled="">
                                        </div>
                                    </div>

                                    <div class="control-group">
                                        <label class="control-label" for="task_name">Email</label>
                                        <div class="controls">
                                            <input type="text" class="span3" id="email" name="email" value="{{.user.Email}}">
                                        </div>
                                    </div>

                                    <div class="control-group">
                                        <label class="control-label" for="password1">新密码</label>
                                        <div class="controls">
                                            <input type="password" class="span3" id="password1" name="password1" value="" />
                                            <p class="help-block">不修改密码请留空</p>
                                        </div>
                                    </div>

                                    <div class="control-group">
                                        <label class="control-label" for="password2">确认密码</label>
                                        <div class="controls">
                                            <input type="password" class="span3" id="password2" name="password2">
                                        </div>
                                    </div>

                                    <div class="form-actions">
                                        <button type="submit" class="btn btn-primary">保存</button>
                                        <button type="button" class="btn btn-default" onclick="javascript:history.back();">返回</button>
                                    </div>
                                    <!-- /form-actions -->

                                </fieldset>
                            </form>

                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<hr class="divider">